package com.java2104.mapper;

import com.java2104.entity.RCClass;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface RCClassMapper {
    @Select("select * from rc_class")
    List<RCClass> findList();
    //根据Id查找班级信息
    @Select("select * from rc_class where id=#{param1}")
    RCClass findByPrimaryKey(int id);
    //更新班级的点名信息
    @Update("update rc_class set check_num=#{checkNum},absence_person_num=#{absencePersonNum}" +
            ",absence_rate=#{absenceRate} where id=#{id}")
    int update(RCClass rcClass);
}
